(function () {


    getWeather();
    function getWeather() {
      jQuery.support.cors = true;
      $.ajax({
        url: "https://devapi.qweather.com/v7/weather/now?key=c6df7f3c8f5f44aab89776abd5902b6e&location=104.516873,31.323662",
        type: "GET",
        dataType: 'json',
        success: function (res) {
          //var res=JSON.parse(res);
          let now =res.now;
          console.log(res)

         document.querySelector('#w_4').src='../水利安全/128/'+now.icon+'.png'
         document.querySelector('#w_1').innerHTML=now.text
         document.querySelector('#w_2').innerHTML=now.temp+'°C'
         document.querySelector('#w_3').innerHTML='四川省德阳市罗江区'

        },
        error: function (err) {
          console.log(err)
        }
      });
    }

    time()
function time(){
      // 获取当前时间
      let timer = null;
      timer = setTimeout(time, 1000);
      function time() {
          clearTimeout(timer);
          let now = new Date();
          let y = now.getFullYear(),
              m = now.getMonth() + 1,
              d = now.getDate(),
              h = now.getHours(),
              minutes = now.getMinutes(),
              s = now.getSeconds();
          document.querySelector(".now_time").innerHTML =  '<p style="font-size:26px">' + n(h) + ':' + n(minutes) + ':' + n(s) +'</p><p>'+y + '/' + n(m) + '/' + n(d) +'</p>';
          timer = setTimeout(time, 1000);
      }
}

function n(h){
    return h<10?('0'+h):h
}


   echarts_11();
    function echarts_11() {
        // 基于准备好的dom，初始化echarts实例
        let myChart = echarts.init(document.getElementById('echarts_11'));
        const option = {
            color:["#FDC345","#00AEA5"],
            tooltip: {
                trigger: 'axis'
            },
            grid: {
                top:30,
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            legend: {
                data: ['安全水位', '当前水位'],
                icon:'circle',
                        itemWidth: 10,
                        itemHeight: 6,
                        itemGap: 10,
                        orient: "horizontal",
                        x: 'center',
                        // y:'bottom',
                        textStyle: {
                            color: '#fff',
                            fontSize: "12"
                        },
            },
            
            calculable: true,
            xAxis: [
                {
                    type: 'category',
                    data: ['凯江', '白土地', '骑龙电站', '华龙水', '军家村1组'],
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                        interval:0,
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    splitLine:{
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                        interval:0,
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    splitLine:{
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    }
                }
            ],
            series: [
                {
                    name: '安全水位',
                    type: 'bar',
                    data: [2.0, 4.9, 7.0, 23.2, 25.6],
                    
                },
                {
                    name: '当前水位',
                    type: 'bar',
                    data: [2.6, 5.9, 9.0, 26.4, 28.7],
                   
                   
                }
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    echarts_5();
    function echarts_5() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts_5'));
        let color=['#74A6F2','#1CE7DC','#F6B54B','#EF702E','#EC342F'];
        const option = {
            color:color,
            tooltip: {
                trigger: 'axis',
            },
            legend: {
                icon:'rect',
                itemWidth: 10,
                itemHeight: 6,
                itemGap: 10,
                orient: "horizontal",
                x: 'center',
                // y:'bottom',
                textStyle: {
                    color: '#fff',
                    fontSize: "12"
                },
                data: ['凯江', '绵远河', '秀水河', '黄水河', '芙蓉溪']
            },
            grid: {
                top:30,
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: ['2018年', '2019年', '2020年', '2021年'],
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                    interval:0,
                },
                splitLine:{
                    show:false
                }
            },
            yAxis: {
                type: 'value',
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                    interval:0,
                },
                  splitLine:{
                    show:false
                }
            },
            series: [
                {
                    name: '凯江',
                    type: 'line',
                    stack: '总量',
                    data: [120, 132, 101, 134]
                },
                {
                    name: '绵远河',
                    type: 'line',
                    stack: '总量',
                    data: [220, 182, 191, 234]
                },
                {
                    name: '秀水河',
                    type: 'line',
                    stack: '总量',
                    data: [150, 232, 201, 154]
                },
                {
                    name: '黄水河',
                    type: 'line',
                    stack: '总量',
                    data: [320, 332, 301, 334]
                },
                {
                    name: '芙蓉溪',
                    type: 'line',
                    stack: '总量',
                    data: [820, 932, 901, 934]
                }
            ]
        };


        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }


    skill()
    function skill() {
        let myChart = echarts.init(document.querySelector("#echarts_4"));
        let myColor = ["#1089E7", "#F57474", "#56D0E3", "#F8B448", "#8B78F6"];
        let option = {
            color: ['#74A6F2', '#EF702E'],
            tooltip: {
                trigger: 'axis',
            },
            legend: {
                orient: "horizontal",
                x: 'center',
                itemWidth: 10,
                itemHeight: 6,
                itemGap: 10,
                y:'bottom',
                textStyle: {
                    color: "#fff",
                    fontSize: "12"
                },
                data:["受威胁人口",'受威胁面积']
            },
            grid: {
                left: 20,
                top: 35,
                right: "10",
                bottom: "20%",
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    data: ["华村夏", "白马凼", "骑龙电站",'凯江','军家村1组'],
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                        interval:0,
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                },
                

            ],
            yAxis: [
                {
                    type: 'value',
                    nameTextStyle:{
                        color:'#fff'
                    },
                    name:'受威胁人口',
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    },
                    // 修改分割线的颜色
                    splitLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    }
                },
                {
                    type: 'value',
                    name: '受威胁面积',
                    nameTextStyle:{
                        color:'#fff'
                    },
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    min: 0,
                    max:500,
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    // 修改分割线的颜色
                    splitLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    }
                }
            ],
            series: [
                {
                    name: '受威胁人口',
                    // smooth: true,
                    type: 'bar',
                    // 单独修改线的样式
                  
                    barWidth: 20,
                    // 填充区域
                  
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                   
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 440, 150, 240, 180],
                },
                {
                    name: '受威胁面积',
                    // smooth: true,
                    type: 'line',
                    // 单独修改线的样式
                    lineStyle: {
                        color: "#FFA92C",
                        width: 2
                    },
                    // 填充区域
                   
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                    itemStyle: {
                        color: "#FFA92C",
                        borderColor: "rgba(221, 220, 107, .1)",
                        borderWidth: 12
                    },
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 220, 120, 440,441],
                }
            ]
        }
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });

    }

    flow();
    function flow() {
        let myChart = echarts.init(document.querySelector("#echarts_3"));
        let color=['#74A6F2','#1CE7DC','#F6B54B','#EF702E','#EC342F'];
        const option = {
            color:color,
            tooltip: {
                trigger: 'axis',
            },
            legend: {
                x: 'right',
                orient: 'vertical',
                icon:'rect',
                itemWidth: 10,
                itemHeight: 6,
                itemGap: 10,
                data: ['凯江', '绵远河', '秀水河', '黄水河', '芙蓉溪'],
                textStyle: {
                    color: '#fff',
                    fontSize: "12"
                }
            },
            grid: {
                top:10,
                left: '3%',
                right: '10%',
                bottom: '3%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                data: ['2018年', '2019年', '2020年', '2021年'],
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                    interval:0,
                },
                splitLine:{
                    show:false
                }
            },
            yAxis: {
                type: 'value',
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                    interval:0,
                },
                  splitLine:{
                    show:false
                }
            },
            series: [
                {
                    name: '凯江',
                    type: 'line',
                    stack: '总量',
                    data: [120, 132, 101, 134]
                },
                {
                    name: '绵远河',
                    type: 'line',
                    stack: '总量',
                    data: [220, 182, 191, 234]
                },
                {
                    name: '秀水河',
                    type: 'line',
                    stack: '总量',
                    data: [150, 232, 201, 154]
                },
                {
                    name: '黄水河',
                    type: 'line',
                    stack: '总量',
                    data: [320, 332, 301, 334]
                },
                {
                    name: '芙蓉溪',
                    type: 'line',
                    stack: '总量',
                    data: [820, 932, 901, 934]
                }
            ]
        };
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }


    netLength();
    function netLength() {
        let myChart = echarts.init(document.querySelector("#echarts_2"));
        let option = {
            color: ['#74A6F2', '#1CE7DC', '#F6B54B','#EF702E','#EC342F'],
            tooltip: {
                trigger: 'axis',
                axisPointer: {            // Use axis to trigger tooltip
                    type: 'shadow'        // 'shadow' as default; can also be 'line' or 'shadow'
                }
            },
            legend: {
                y:'bottom',
                data: ['河流', '水库', '水电站','山洪灾害区','易洪区'],
                icon:'rect',
                itemWidth: 10,
                itemHeight: 6,
                itemGap: 10,
                textStyle:{
                    color: '#bac0c0',
                    fontWeight: 'normal',
                    fontSize: 12,
                    }
                
            },
            grid: {
                top: '3%',
                left: '3%',
                right: '10%',
                bottom: '25%',
                containLabel: true
            },
            xAxis: {
               
                type: 'value',
                splitLine: {
                    show: false
                },
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                },

            },
            yAxis: {
                type: 'category',
                data: ["万安", "金山", "白马", "新盛", "鄢家", "略坪", "调元"],
                axisLabel: {
                    textStyle: {
                        color: '#bac0c0',
                        fontWeight: 'normal',
                        fontSize: 12,
                    },
                },

            },
            series: [
                {
                    name: '河流',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 10,
                    // label: {
                    //     show: true
                    // },
                    itemStyle:{
                        barBorderRadius: [10,0,0,10],
                    },
                    emphasis: {
                        focus: 'series'
                    },

                    data: [320, 302, 301, 334,134,342,120]
                },
                {
                    name: '水库',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 10,
                    // label: {
                    //     show: true
                    // },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [120, 132, 101, 134,341,123,431]
                },
                {
                    name: '水电站',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 10,
                    // label: {
                    //     show: true
                    // },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [220, 182, 191, 234,120, 132, 101]
                },
                {
                    name: '山洪灾害区',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 10,
                    // label: {
                    //     show: true
                    // },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [220, 182, 191, 234,220, 182, 191]
                },
                {
                    name: '易洪区',
                    type: 'bar',
                    stack: 'total',
                    barWidth: 10,
                    // label: {
                    //     show: true
                    // },
                    itemStyle:{
                        barBorderRadius: [0,10,10,0],
                    },
                    emphasis: {
                        focus: 'series'
                    },
                    data: [220, 220, 182, 191,182, 191, 234]
                }

            ]
        };
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }

    flow1();
    function flow1() {
        let myChart = echarts.init(document.querySelector("#echarts_1"));
        let option = {
            color: ['#74A6F2', '#EF702E'],
            tooltip: {
                trigger: 'axis',
            },
            legend: {
                orient: "horizontal",
                x: 'center',
                y:'bottom',
                textStyle: {
                    color: "#4c9bfd",
                    fontSize: "12"
                },
                icon:'rect',
                itemWidth: 10,
                itemHeight: 6,
                itemGap: 10,
                data:["受威胁人口",'受威胁面积']
            },
            grid: {
                left: "10",
                top: 15,
                right: "10",
                bottom: "20%",
                containLabel: true
            },
            xAxis: [
                {
                    type: 'category',
                    data: ["华村夏", "白马凼", "骑龙电站",'凯江','军家村1组'],
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                        interval:0,
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                },
                

            ],
            yAxis: [
                {
                    type: 'value',
                    name:'',
                    // 文本颜色为#4c9bfd  文字大小为 12
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    // 修改分割线的颜色
                    splitLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    }
                },
                {
                    type: 'value',
                    name: '',
                    axisLabel: {
                        textStyle: {
                            color: '#bac0c0',
                            fontWeight: 'normal',
                            fontSize: 12,
                        },
                    },
                    min: 0,
                    max:500,
                    // x轴线的颜色为   rgba(255,255,255,.2)
                    axisLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.2)"
                        }
                    },
                    // 修改分割线的颜色
                    splitLine: {
                        lineStyle: {
                            color: "rgba(255,255,255,.1)"
                        }
                    }
                }
            ],
            series: [
                {
                    name: '受威胁人口',
                    // smooth: true,
                    type: 'bar',
                    // 单独修改线的样式
                  
                    barWidth: 20,
                    // 填充区域
                  
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                   
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 440, 150, 240, 180],
                },
                {
                    name: '受威胁面积',
                    // smooth: true,
                    type: 'line',
                    // 单独修改线的样式
                    lineStyle: {
                        color: "#FFA92C",
                        width: 2
                    },
                    // 填充区域
                   
                    // 设置拐点 小圆点
                    symbol: "circle",
                    // 拐点大小
                    symbolSize: 8,
                    // 设置拐点颜色以及边框
                    itemStyle: {
                        color: "#FFA92C",
                        borderColor: "rgba(221, 220, 107, .1)",
                        borderWidth: 12
                    },
                    // 开始不显示拐点， 鼠标经过显示
                    showSymbol: false,
                    data: [130, 220, 120, 440,441],
                }
            ]
        }
        myChart.setOption(option);
        window.addEventListener("resize", function () {
            myChart.resize();
        });
    }
    map();
    function map(){
        $.get('./js/luojiang.json', function (geoJson) {
            let myChart = echarts.init(document.querySelector("#map"));
    
            echarts.registerMap('LJ', geoJson);
            let itemStyle={
                normal: {
                    borderColor: '#7AF1F0',
                    borderWidth: 1,
                    shadowColor: '#7AF1F0',
                    shadowBlur: 3,
                    areaColor: 'rgba(120,152,225, 0.05)',
                },
                emphasis: {
                    areaColor: 'rgba(120,152,225, 0.1)'
                },
                zoom:1.2
            }
           let color= ["#ED5454","#ED5454","#ED5454","#ED5454"]//['#ed8884', '#ff9f7f', '#006cff','#60cda0']//'#ff9f7f', '#0096ff', '#9fe6b8', '#32c5e9', '#1d9dff']
            var markPointData = [{
                name: "罗江区新盛在天然气管理站",
                coord: [
                    104.640269,31.271009  //坐标，通过百度地图提取
                ],
                itemStyle:{
                    normal:{
                        color:color[0]
                    }
                },
                address:'天星村七组',
                
                symbolSize :20,
                effect : {
                    show: true,
                    shadowBlur : 0
                },
            },{
                name: "德阳罗江兴能天然气有限公司",
                coord: [
                    104.5016649,31.2950279
                ],
                itemStyle:{
                    normal:{
                        color:color[1]
                    }
                },
                address:'罗江区黎明南路6号',
                
                symbolSize : 20,
                effect : {
                    show: true,
                    shadowBlur : 0
                },
            },{
                name: "四川石化江城燃气有限公司",
                coord: [
                    104.547207,31.305981
                ],
                itemStyle:{
                    normal:{
                        color:color[2]
                    }
                },
                address:'罗江区鄢家镇七里村五组',
                
                symbolSize : 20,
            },{
                name: "罗江同辉燃气工程有限公司",
                coord: [
                    104.516076,31.297624
                ],
                itemStyle:{
                    normal:{
                        color:color[3]
                    }
                },
                address:'罗江区狮峰路51号',
                  // 标注图片地址路径

                symbolSize : 20,
            },{
                name: "罗江县龙洲天然气有限责任公司",
                coord: [
                    104.541587,31.38406
                ],
                itemStyle:{
                    normal:{
                        color:color[1]
                    }
                },
                address:'金山镇工业园区邛海路',
                  // 标注图片地址路径
                symbolSize : 20,
            }
            
           
        ];
            myChart.setOption(option = {
               
                title: {
                    text: '',
                    color:'#fff',
                    x:'20px',
                    y:'20px',
                    // subtext: '人口密度数据来自Wikipedia',
                    textStyle:{
                           color:'#fff'
                   }
                },
                tooltip: {
                    trigger: 'item',
                    formatter: '{b}<br/>'
                },
               
                geo: {
                    show: true,
                    map: 'LJ',
                    label: {
                        emphasis: {
                            show: false
                        }
                    },
                    roam: false,
                    itemStyle: {
                        normal: {
                            borderColor: '#4085d3',
                            // borderWidth: 1.5,
                            // shadowColor: '#000',
                            // shadowBlur: 50,
                            areaColor: 'rgba(120,152,225, 0.00',
                        },
                        emphasis: {
                            // areaColor: '#4f92fa'  //鼠标移上每一省份的颜色
                            areaColor: 'rgba(120,152,225, 0.1)',
                        }
                    }
                },
                
                series: [
                    {
                        
                        name: '香港18区人口密度',
                        type: 'map',
                        mapType: 'LJ', // 自定义扩展图表类型
                        label: {
                            show: true,
                            color:'#fff'
                        },
                        markPoint: { //图表标注。
                            data: markPointData
                        },
                        itemStyle:itemStyle
                        // zoom: 1.2,
                        // opacity: 0.3,
                        // data: [
                        //     {name: '蟠龙镇', value: 20057.34, itemStyle:itemStyle},
                        //     {name: '金山镇', value: 31686.1,itemStyle:itemStyle },
                        //     {name: '鄢家镇', value: 44045.49,itemStyle:itemStyle },
                        //     {name: '新盛镇', value: 40689.64,itemStyle:itemStyle },
                        //     {name: '略坪镇', value: 37659.78,itemStyle:itemStyle },
                        //     {name: '白马关镇', value: 45180.97,itemStyle:itemStyle },
                        //     {name: '调元镇', value: 55204.26,itemStyle:itemStyle },
                        //     {name: '万安镇', value: 21900.9,itemStyle:itemStyle },
                            
                        // ],
                        
                    },
                   
                ]
            });
        window.addEventListener("resize",function(){
            myChart.resize();
        });
        myChart.on('click',function(params){ //点击事件
           if(params.componentType==='markPoint'){
    
           }else{
    
           }
        });
    });
    }

    area()
    function area(){
        let myChart = echarts.init(document.querySelector("#echarts_0"));
        let option ={
            color: ['#74A6F2', '#1CE7DC', '#F6B54B','#EF702E','#EC342F'],
            tooltip: {
                trigger: 'item',
                formatter: '{a} <br/>{b} : {c} ({d}%)'
            },
            legend: {
                y:'bottom',
                data: ['河流', '水库', '水电站','水电站','山洪灾害区','易洪区'],
                icon:'rect',
                itemWidth: 10,
                itemHeight: 6,
                itemGap: 10,
                textStyle:{
                    color: '#bac0c0',
                    fontWeight: 'normal',
                    fontSize: 12,
                    }
                
            },
            series: [
                {
                    name: '安全生产现状图',
                    type: 'pie',
                    radius: ['10%', '70%'],
                    center: ['50%', '40%'],
                    // 文本标签控制饼形图文字的相关样式， 注意它是一个对象
                    label: {
                        fontSize: 10
                    },
                    // 引导线调整
                    labelLine: {
                        // 连接扇形图线长
                        length: 6,
                        // 连接文字线长
                        length2: 5
                    } ,
                    roseType: "radius",
                    data: [
                        { value: 20, name: '河流' },
                        { value: 26, name: '水库' },
                        { value: 24, name: '水电站' },
                        { value: 25, name: '山洪灾害区' },
                        { value: 20, name: '易洪区' }
                    ]
                }
            ]
        }
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }

})()